﻿using System;
using System.IO;
using UnityEngine;

namespace Character
{
	// Token: 0x02000197 RID: 407
	public abstract class ColorParameter_Base
	{
		// Token: 0x06000AAD RID: 2733
		public abstract COLOR_TYPE GetColorType();

		// Token: 0x06000AAE RID: 2734
		public abstract void Save(BinaryWriter writer);

		// Token: 0x06000AAF RID: 2735
		public abstract bool Load(BinaryReader reader, CUSTOM_DATA_VERSION version);

		// Token: 0x06000AB0 RID: 2736 RVA: 0x0003DD2C File Offset: 0x0003BF2C
		protected void Save_ColorType(BinaryWriter writer)
		{
			writer.Write((int)this.GetColorType());
		}

		// Token: 0x06000AB1 RID: 2737 RVA: 0x0003DD3C File Offset: 0x0003BF3C
		protected static COLOR_TYPE Load_ColorType(BinaryReader reader, CUSTOM_DATA_VERSION version)
		{
			return (COLOR_TYPE)reader.ReadInt32();
		}

		// Token: 0x06000AB2 RID: 2738
		public abstract void SetToMaterial(Material material);

		// Token: 0x06000AB3 RID: 2739 RVA: 0x0003DD44 File Offset: 0x0003BF44
		protected void WriteColor(BinaryWriter writer, Color color)
		{
			writer.Write(color.r);
			writer.Write(color.g);
			writer.Write(color.b);
			writer.Write(color.a);
		}

		// Token: 0x06000AB4 RID: 2740 RVA: 0x0003DD7C File Offset: 0x0003BF7C
		protected void ReadColor(BinaryReader reader, ref Color color)
		{
			color.r = reader.ReadSingle();
			color.g = reader.ReadSingle();
			color.b = reader.ReadSingle();
			color.a = reader.ReadSingle();
		}
	}
}
